//页面之间传递一些公共变量
import {
  defineStore
} from 'pinia';
import {
  ref
} from 'vue'

export const useSwitch = defineStore('switch', () => {
  //添加病人返回后是否重新加载数据
  const reloadPaitent = ref(false)
  //添加病人返回后是否重新加载数据
  const reloadAddress = ref(false)

  function controlReloadPaitent(swithch) {
    reloadPaitent.value = swithch
  }
  
  function controlReloadAddress(swithch) {
    reloadAddress.value = swithch
  }
  return {
    reloadPaitent,
    reloadAddress,
    controlReloadPaitent,
    controlReloadAddress
  };
})